package xcmg.device.web.report;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiOperation;
import xcmg.device.infra.BasicController;
import xcmg.device.service.report.BackMoneyService;
import xcmg.device.service.vo.report.BackMoneyConditionVO;
import yb.ecp.fast.infra.annotation.FastMappingInfo;
import yb.ecp.fast.infra.infra.ActionResult;
import yb.ecp.fast.infra.infra.SearchCommonVO;

@RestController
@RequestMapping("/backMoney")
public class BackMoneyController extends BasicController {

	@Autowired
	private BackMoneyService backMoneyService;
	
	@RequestMapping(value = "/pageList",method = RequestMethod.POST)
    @ApiOperation("分页查询")
    @FastMappingInfo(needLogin = true)
	public ActionResult pageList(@RequestBody SearchCommonVO<BackMoneyConditionVO> conditionVO) throws Exception {
		return actionValueResult(backMoneyService.pageList(conditionVO, getOrgId()).getPageInfo());
	}
	
	@RequestMapping(value = "/export",method = RequestMethod.POST)
    @ApiOperation("导出")
    @FastMappingInfo(needLogin = true)
	public void export(BackMoneyConditionVO condition) throws Exception {
		backMoneyService.export(condition, getOrgId());
	}
}
